﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SQLite;
using WR.FM.Model;

namespace WR.FM.DAL
{
    public class FundBasicDAL
    {

        //public FundBasic GetById(int Id)
        //{
        //    using (SQLiteConnection conn = new SQLiteConnection(BaseDAL.strSqlConnection))
        //    {
        //        conn.Open();
        //        string sql = @"select * from FundBasic where Id = @Id";
        //        SQLiteCommand cmd = new SQLiteCommand(sql, conn);
        //        try
        //        {

        //        }
        //        catch (Exception ex)
        //        {
        //            throw ex;
        //        }
        //        finally
        //        {
        //            cmd.Dispose();
        //            conn.Close();
        //        }
        //        return null;
        //    }
        //}


        public FundBasic GetById(int id)
        {
            using (FMDbContext db = new FMDbContext())
            {
                return db.FundBasic.FirstOrDefault(x => x.Id == id);
            }
        }
    }
}
